package com.alibaba.citrus.cr.forecast.repository;

import com.alibaba.cz.base.tool.page.PageResult;
import com.alibaba.lattice2.epoch.sdk.model.Result;
import com.epoch.app.crforecastsales.dto.request.DealForecastListRequest;
import com.epoch.app.crforecastsales.dto.response.DealForecastOrderResponse;
import com.epoch.app.crforecastsales.dto.response.QueryForecastLineResponse;
import com.epoch.app.crforecastsales.forecastorderlineindex.model.ForecastOrderLineIndex;
import com.epoch.app.crforecastsales.model.dto.SearchForecastOrderRequest;
import com.epoch.app.crforecastsales.sdo.ForecastOrderLineSDO;
import com.epoch.app.crforecastsales.sdo.ForecastOrderSDO;
import com.epoch.app.crplatformenhance.model.dto.DailyInventoryLine;
import com.epoch.app.crplatformenhance.model.dto.QueryResolveInventoryResponse;

import java.util.List;

/**
 * @author: qiaojiange
 * @create: 2021/09/15
 * @Description 请描述类的业务用途
 */

public interface ForecastOrderLineQueryRepository {
    List<ForecastOrderLineSDO> queyrLineDetailList(ForecastOrderLineSDO forecastOrderLineSDO);
//    PageResult<List<QueryForecastLineResponse>> pageQuery(PageQueryForecastLineRequest pageQueryForecastLineRequest);

    ForecastOrderLineSDO query(String id);


    ForecastOrderSDO queryByOrderId(ForecastOrderSDO forecastOrderSDO);

    PageResult<List<ForecastOrderLineSDO>> batchLoadList(List<String> ids);

    PageResult<List<ForecastOrderLineSDO>> queryListByDealStatus(List<Integer> dealStatus);

    List<ForecastOrderLineSDO> batchForecastOrderLineList(List<String> ids);


    Result<List<QueryForecastLineResponse>> pageQuery(SearchForecastOrderRequest pageQueryForecastRequest);

    QueryResolveInventoryResponse getInventoryByCache(ForecastOrderLineIndex forecastOrderLineIndex);

    ForecastOrderLineIndex getForecastOrderLineIndex(ForecastOrderLineSDO forecastOrderLineSDO);

    DailyInventoryLine getDailyInventoryByCache(ForecastOrderLineIndex forecastOrderLineIndex);

    List<DealForecastOrderResponse> loadDealForecastListV2(DealForecastListRequest dealForecastListRequest);

    // 此方法若与0925分支发生冲突，以bugfix分支为准。（0925分支代码会删掉）
    List<DealForecastOrderResponse> loadDealForecastListV3(DealForecastListRequest dealForecastListRequest);

    Result<List<ForecastOrderLineIndex>> queryForecastOrderLinesForReport(SearchForecastOrderRequest pageQueryForecastRequest);

}
